<?php


namespace app\shop\command;


use yunwuxin\cron\Task;
use think\facade\Db;

class ClearAdminLog extends Task
{
    protected function configure()
    {
        $this->weekly();
    }

    protected function execute()
    {
        Db::name('admin_log')->where('create_time', '<=', strtotime("-14 days"))->delete();
        print "****************定时日志记录成功******************\n";
    }
}